/**
 * 
 */
package org.cuatrovientos.dado;

import java.util.Random;

/**
 * @author inigo_alzorriz
 *
 */
public class Dado {

	private int sides;
	private boolean Cero = true;
	/**
	 * Constructor with sides
	 */
	
	public Dado() {
		this.sides = 6;
	}
	/**
	 * 
	 * @param sides
	 */
	public Dado (int sides) {
		
	}
	public Dado (boolean Cero, int sides) {
		this.Cero = Cero;
		this.sides = sides;
		
	}
	/**
	 * Roll the dice
	 * @return
	 */
	public int Roll() {
		Random rnd = new Random();
		if(Cero) {
			return rnd.nextInt(sides);
		} else {
			return(int)(Math.random()*sides+1);
		}
	}
}